package cn.springboot.erp.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName sales_orders
 */
@TableName(value ="sales_orders")
@Data
public class SalesOrders implements Serializable {
    /**
     * 订单ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    @TableField(value = "order_number")
    private String orderNumber;

    /**
     * 客户ID，关联客户表
     */
    @TableField(value = "customer_id")
    private Integer customerId;

    /**
     * 订单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd" ,timezone = "GMT+8")
    @TableField(value = "order_date")
    private Date orderDate;

    /**
     * 订单总金额
     */
    @TableField(value = "total_amount")
    private Double totalAmount;

    /**
     * 支付状态:默认0未付款。1已付款
     */
    @TableField(value = "payment_status")
    private Integer paymentStatus;

    /**
     * 订单备注
     */
    @TableField(value = "note")
    private String note;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}